<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../head/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="window.resource.menu" /></title>
<script type="text/javascript">
	//功能模块
	var window_resource_function = '<spring:message code="window.resource.function"/>';
	//数据模块
	var window_resource_data = '<spring:message code="window.resource.data"/>';
	//角色选择
	var window_resource_role = '<spring:message code="window.resource.role"/>';
	//菜单选择
	var window_resource_account = '<spring:message code="window.resource.account"/>';

	//button角色选择
	var button_resource_role = '<spring:message code="button.resource.role"/>';
	//button菜单选择
	var button_resource_account = '<spring:message code="button.resource.account"/>';
	//编辑菜单
	var window_resource_menu_edit = '<spring:message code="window.resource.menu.edit"/>';

	//允许
	var lable_permission_allowed = '<spring:message code="lable.permission.allowed"/>';
	//禁止
	var lable_permission_refused = '<spring:message code="lable.permission.refused"/>';
	//继承
	var lable_permission_inherited = '<spring:message code="lable.permission.inherited"/>';
	//资源名称
	var lable_resource_label = '<spring:message code="lable.resource.label"/>';
	//资源标识
	var lable_resource_res = '<spring:message code="lable.resource.res"/>';
	//是否进行授权
	var lable_resource_assign = '<spring:message code="lable.resource.assign"/>';
	var lable_resource_assign_true = '<spring:message code="lable.resource.assign.true"/>';
	var lable_resource_assign_false = '<spring:message code="lable.resource.assign.false"/>';
	//资源所属应用系统
	var lable_resource_app = '<spring:message code="lable.resource.app"/>';
	//菜单路径
	var lable_resource_path = '<spring:message code="lable.resource.path"/>';
	//是否是全路径
	var lable_resource_fullpath = '<spring:message code="lable.resource.fullpath"/>';
	var lable_resource_fullpath_true = '<spring:message code="lable.resource.fullpath.true"/>';
	var lable_resource_fullpath_false = '<spring:message code="lable.resource.fullpath.false"/>';
	//图片名称
	var lable_resource_iconnm = '<spring:message code="lable.resource.iconnm"/>';
	//菜单名称
	var lable_resource_menuname = '<spring:message code="lable.resource.menuname"/>'
	//
	var message_info_menu_select ='<spring:message code="message.info.menu.select"/>';
	
	//注销提示信息  
	var delete_ = '<spring:message code="lable.delete"/>';
	var message_info_modify_select_delete='<spring:message code="message.info.modify.select" arguments="'+delete_+'"/>';
	
	var window_resource_menu='<spring:message code="window.resource.menu" />';
	//提交路径

	//初始化菜单
	var initMenu_= '<z:ukey key="initMenu"  context="admin"/>';
	//编辑菜单
	var editmenu_= '<z:ukey key="editMenu"  context="admin"/>';
	//菜单查询
	var findmenu_= '<z:ukey key="findMenu"  context="admin"/>';

	//根据资源ID得到该资源
	var findmenubyid_= '<z:ukey key="findMenuById"  context="admin"/>';
	//删除菜单资源
	var removemenu_= '<z:ukey key="removeMenu"  context="admin"/>';
	//校验资源标识是否存在
	var existres_= '<z:ukey key="existRes"  context="admin"/>';

	//应用系统
	var craapphelper_= '<z:ukey key="craAppHelper"  context="admin"/>';
	var initRoleInfo_ = '<z:ukey key="initRoleInfo"  context="admin"/>';
</script>

<script type="text/javascript" src="<%=localServer%>/page/resource/menu.js"></script>
</head>
<body>
	<div>
		<fieldset>
			<legend>
				<spring:message code="window.resource.manager" />
			</legend>
			<form action="" method="post">
				<table>
					<tr>
						<td><label for="name"><spring:message
									code="lable.application" /></label></td>
						<td><select id="cra_app" name="cra_app" style="width: 300px"
							onchange="craAppChange()">
						</select></td>
					</tr>
				</table>
			</form>
		</fieldset>
	</div>
	<table id="function_module"></table>

	<!-- 功能模块选中的菜单信息 -->
	<input type="hidden" value="" id="fn_select_account_ids" />
	<input type="hidden" value="" id="fn_select_account_names" />
	<!-- 数据模块选中的菜单信息 -->
	<input type="hidden" value="" id="da_select_account_ids" />
	<input type="hidden" value="" id="da_select_account_names" />

	<!-- 功能模块选中的角色信息 -->
	<input type="hidden" value="" id="fn_select_role_ids" />
	<input type="hidden" value="" id="fn_select_role_names" />
	<!-- 数据模块选中的角色信息 -->
	<input type="hidden" value="" id="da_select_role_ids" />
	<input type="hidden" value="" id="da_select_role_names" />
	<div id="edit_menu"
		style="display: none; width: 580px; height: 200px; top: 0px; left: 0px;">
		<form id="edit_menu_form">
			<table>
				<tr>
					<td><spring:message code="lable.resource.menuname" /><input type="hidden" id="parentId" name="parentId"/><input type="hidden" id="group" name="group"/></td>
					<td><input type="text" name="label"  class="easyui-validatebox" required="true"/></td>
					<td><spring:message code="lable.resource.res" /></td>
					<td><input type="text" name="res"  class="easyui-validatebox"  required="true" id="res" invalidMessage="{remote:'<spring:message code="message.info.menu.existres"/>'}"
					validType ="remote[existres_+'?appCd='+$('#cra_app').val(),'res','jsoncallback=?']" event="change"
					/><input type="hidden" id="id" name="id" value=""/></td>
				</tr>
				<tr>
					<td><spring:message code="lable.resource.app" /></td>
					<td><input type="text" name="appName" readonly="readonly" id="appName"/><input
						type="hidden" name="appCd" id="appCd" /></td>
					<td><spring:message code="lable.resource.assign" /></td>
					<td><input type="radio" name="assign" value="true" />
					<spring:message code="lable.resource.assign.true" /><input
						type="radio" name="assign" value="false" />
					<spring:message code="lable.resource.assign.false" /></td>
				</tr>
				<tr>
					<td><spring:message code="lable.resource.path" /></td>
					<td><input type="text" name="path" /></td>
					<td><spring:message code="lable.resource.fullpath" /></td>
					<td><input type="radio" name="fullPath" value="true" />
					<spring:message code="lable.resource.fullpath.true" /><input
						type="radio" name="fullPath" value="false" />
					<spring:message code="lable.resource.fullpath.false" /></td>
				</tr>
				<tr>
					<td><spring:message code="lable.resource.iconnm" /></td>
					<td><input type="text" name="iconNm" /></td>
					<td>&nbsp;</td>
					<td></td>
				</tr>
			</table>
		</form>
	</div>

	<!-- 菜单选择 -->
	<div id="select_account"
		style="display: none; width: 640px; height: 300px; top: 0px; left: 0px;"
		title="资源查询">
		<iframe width="100%" style="top: 0px; left: 0px" height="100%"
			id="account_search" name="frame" frameborder="0" scrolling="no"></iframe>
	</div>

</body>
</html>